﻿<Window x:Class="wpfTool.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF TOOL" Height="600" Width="800">
    <DockPanel>
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="_File">
                <MenuItem Header="_New..." />
                <MenuItem Header="_Open..." />
                <Separator />
                <MenuItem Header="Sen_d To">
                    <MenuItem Header="Mail Recipient" />
                    <MenuItem Header="My Documents" />
                </MenuItem>
                <Separator />
                <MenuItem Header="_Exit" Click="MenuItem_Exit_Click" />
            </MenuItem>
            <MenuItem Header="_Edit">
                <MenuItem Header="Run Current Pipeline" Click="MenuItem_Run_Click" />
                <MenuItem Header="Add PipelineView" Click="MenuItem_AddPipeline_Click" />
            </MenuItem>
        </Menu>

        <ToolBar DockPanel.Dock="Top">
            <ToggleButton x:Name="EditButton" Click="Button_Click">Edit</ToggleButton>
            <ToggleButton x:Name="thePreviewModeToggleButton" IsChecked="True">PreviewMode</ToggleButton>
            <ToggleButton Click="ToggleButton_AddWidget_Click">AddWidget</ToggleButton>
        </ToolBar>

        <StatusBar x:Name="theStatusBar" DockPanel.Dock="Bottom" Height="20" TextElement.FontSize="12" TextElement.FontFamily="Arial">
            <Label Padding="0">27 Items</Label>
            <Separator />
            <Label Padding="0">Zoom</Label>
            <ComboBox Padding="0">
                <ComboBoxItem>100%</ComboBoxItem>
                <ComboBoxItem>70%</ComboBoxItem>
                <ComboBoxItem>50%</ComboBoxItem>
            </ComboBox>
            <Separator />
            <Button Padding="0" Height="15" Width="30">
                <Image Source="image/toolbox.jpg" />
            </Button>
        </StatusBar>

        <!-- The bar docked along the right edge-->
        <StackPanel Name="ComboBar" Orientation="Horizontal" DockPanel.Dock="Right">
            <StackPanel.LayoutTransform>
                <RotateTransform Angle="90" />
            </StackPanel.LayoutTransform>
            <Button Name="panel1Button" MouseEnter="panel1Button_MouseEnter" MaxHeight="25" MaxWidth="100">
                <StackPanel Orientation="Horizontal">
                    <Image Source="image/toolbox.jpg" />
                    <Label Padding="2">Toolbox</Label>
                </StackPanel>
            </Button>
        </StackPanel>

        <!-- The Grid containing the three child Grids fills the DockPanel -->
        <Grid Name="layerGridParent" Grid.IsSharedSizeScope="True">
            <!-- Layer 0 -->
            <Grid Name="layer0" MouseEnter="layer0_MouseEnter">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <TabControl x:Name="theTab" Grid.Column="0" Grid.Row="0">
                </TabControl>
            </Grid>

            <!-- Layer 1-->
            <Grid x:Name="layer1" Visibility="Collapsed">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition SharedSizeGroup="column1" Width="auto" />
                </Grid.ColumnDefinitions>

                <!-- Column 0 is empty, but column 1 contains a grid and a gridsplitter -->
                <Grid Background="White" Grid.Column="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto" />
                        <RowDefinition />
                        <RowDefinition Height="auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <!-- Row 0 contain a header, and row 1 contains pane-specific content -->
                    <DockPanel Grid.Row="0">
                        <Button Name="panel1Pin" Width="26" DockPanel.Dock="Right"
                                Click="panel1Pin_Click" Background="White">
                            <Image Name="panel1PinImage" Source="image/pinHorizontal.gif" />
                        </Button>
                        <TextBlock Padding="8" TextTrimming="CharacterEllipsis"
                                   Foreground="{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}"
                                   DockPanel.Dock="Left">Toolbox</TextBlock>
                    </DockPanel>
                    
                    <TabControl Grid.Row="1">
                        <TabItem>
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Height="15" Source="image/database.png" />
                                    <Label>Database</Label>
                                </StackPanel>
                            </TabItem.Header>
                        </TabItem>
                        
                        <TabItem>
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Height="15" Source="image/shader.jpg" />
                                    <Label>Shaders</Label>
                                </StackPanel>

                            </TabItem.Header>
                            <ListBox x:Name="theShaderListBox">

                            </ListBox>
                        </TabItem>
                    </TabControl>
                    
                    <GridSplitter Height="5" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />

                    <Grid x:Name="propertyGridWindow" Grid.Row="3">
                        
                    </Grid>
                </Grid>
                <GridSplitter Width="5" Grid.Column="1" HorizontalAlignment="Left" />
            </Grid>
        </Grid>             

    </DockPanel>
</Window>
